本文的英文正文是作者本人的原文,写于 2025 年 8 月 11 日;中文由 AI(Claude)翻译,不是 AI 创作。命令、参数与版本号按原文保留,AI 没有重新运行这些命令。文中出现的服务器与本地路径已做匿名化处理(真实的用户名与项目目录名已替换为占位名),直接复制时请替换成自己的目录。
The English text below is the author’s original, written on 11 August 2025. The Chinese is a translation by an AI system (Claude); this is not AI-generated content. Commands, parameters and version strings are kept as in the original, and the AI did not re-run them. The server and local paths shown here have been anonymised (the real user name and project directory names have been replaced with placeholders); replace them with your own before running anything.
把这篇英文教程翻译成中文,逐段对照。所有命令、路径、参数、版本号原样保留,不要改写或补充技术内容;明确说明这是英文原文的翻译,而不是 AI 创作;保留原文的步骤结构。
Translate this English tutorial into Chinese, paragraph by paragraph. Keep every command, path, parameter and version string verbatim; do not rewrite or add technical content; state clearly that this is a translation of the author’s English original rather than AI-generated content; preserve the original step structure.
1. 测试环境 / Tested environment
本教程在 Ubuntu 18.04 上使用 DIA-NN 2.2.0(学术版)测试。
This tutorial was tested on Ubuntu 18.04 with DIA-NN 2.2.0 (academic).
2. 准备:下载 DIA-NN 安装包 / Preparation: Download the DIA-NN Installation Package
2.1 下载并解压 DIA-NN / Download and unzip DIA-NN
官方仓库是 https://github.com/vdemichev/DiaNN,发布页是 https://github.com/vdemichev/DiaNN/releases。从 GitHub 下载官方学术版:
The official repository is https://github.com/vdemichev/DiaNN, and the releases page is https://github.com/vdemichev/DiaNN/releases. Download the official academic release from GitHub:
wget https://github.com/vdemichev/DiaNN/releases/download/2.0/DIA-NN-2.2.0-Academia-Linux.zip -O DIA-NN-2.2.0-Academia-Linux.zip
unzip DIA-NN-2.2.0-Academia-Linux.zip -d diann-2.2.0解压后会得到一个名为 diann-2.2.0 的文件夹,里面有可执行文件 diann-linux 以及它依赖的库。
This will unzip a folder named diann-2.2.0, which contains the executable diann-linux and its dependencies.
2.2 确认已安装 Docker / Make sure Docker was installed
官方教程见 https://docs.docker.com/engine/install/ubuntu/,建议用 APT 安装。
The official tutorial is at https://docs.docker.com/engine/install/ubuntu/. It is suggested to install via APT.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install required packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Check if docker works
sudo docker run hello-world
# It will print a message.最后一条命令会打印一条消息,说明 Docker 已经可用。
It will print a message.
3. 编写 Dockerfile / Write the Dockerfile
在 diann-2.2.0 的父目录中新建一个 Dockerfile,内容如下:
Create a Dockerfile in the parent directory of diann-2.2.0 with the following content:
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y libgomp1 locales wget unzip curl apt-transport-https && \
locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Install .NET Runtime 8.0
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt update && \
apt install -y dotnet-sdk-8.0 aspnetcore-runtime-8.0 dotnet-runtime-8.0 && \
apt update && \
apt upgrade -y
# Copy the locally extracted DIA-NN folder into the image
COPY diann-2.2.0 /opt/diann-2.2.0
WORKDIR /opt/diann-2.2.0
RUN chmod -R 775 /opt/diann-2.2.0
CMD ["./diann-linux", "-v"]4. 构建镜像 / Build the Docker Image
进入存放 Dockerfile 的目录,执行:
Navigate to the directory containing the Dockerfile and run:
docker build -t diann-2.2.0-dotnet .5. 验证版本 / Run the Image to Check Version (Test)
运行下面的命令,确认镜像可以正常工作:
Run this command to verify the image is working:
docker run --rm diann-2.2.0-dotnet如果看到 DIA-NN 的版本信息,说明镜像构建成功。
If you see the DIA-NN version information, the image was built successfully.
6. 一个真实的 DIA 分析任务 / Example: Running an Actual Analysis Task
先准备输出目录,例如:
First, prepare the output directory, like:
mkdir -p /mnt/ms_data/txt然后挂载原始数据文件,带上必要参数运行 DIA-NN:
Then run DIA-NN with your raw data files mounted and necessary parameters:
可用的参数见命令行参考:https://github.com/vdemichev/DiaNN?tab=readme-ov-file#command-line-reference。
Check the available parameters: https://github.com/vdemichev/DiaNN?tab=readme-ov-file#command-line-reference.
实际运行时可以用:
Then it could be run with:
docker run --rm \
-v /mnt/ms_data:/data \
diann-2.2.0-dotnet \
./diann-linux \
--f "/data/Ref10812_S1_20250704.raw" \
--f "/data/Ref10812_S2_20250704.raw" \
--f "/data/Ref10812_S3_20250704.raw" \
--lib "" \
--threads 48 \
--verbose 3 \
--out "/data/txt/report.parquet" \
--qvalue 0.01 \
--matrices \
--out-lib "/data/txt/report-lib.parquet" \
--gen-spec-lib \
--predictor \
--prosit \
--fasta "/data/Hybird.AllSamples.IsoQuant.TD2.fasta" \
--fasta-search \
--min-fr-mz 200 \
--max-fr-mz 1800 \
--met-excision \
--min-pep-len 7 \
--max-pep-len 30 \
--min-pr-mz 300 \
--max-pr-mz 1800 \
--min-pr-charge 1 \
--max-pr-charge 4 \
--cut K*,R* \
--missed-cleavages 1 \
--unimod4 \
--no-prot-inf \
--reanalyse \
--rt-profiling \
--no-norm7. 先在 Windows 上试参数 / Windows Example Command
如果不确定参数怎么写,可以先把整套流程在 Windows 上跑通,拿到命令行参数,再复制到 Linux。
If we are not sure about the parameters, we could set up everything and run on Windows to get the command line parameters, then copy them to Linux.
在 Windows 上可以类似地运行 DIA-NN,只需调整路径与参数:
From Windows, you can run DIA-NN similarly (adjusting paths and parameters):
diann.exe --f "H:\MS_data\Ref10812_20250704\Ref10812_S1_20250704.raw" \
--f "H:\MS_data\Ref10812_20250704\Ref10812_S2_20250704.raw" \
--f "H:\MS_data\Ref10812_20250704\Ref10812_S3_20250704.raw" \
--lib "" --threads 8 --verbose 3 --out "C:\Temp\report.parquet" \
--qvalue 0.01 --matrices --out-lib "C:\Temp\report-lib.parquet" --gen-spec-lib --predictor --prosit \
--fasta "Y:\MS_data\Hybrid_protein_sequences\Hybird.AllSamples.IsoQuant.TD2.fasta" --fasta-search \
--min-fr-mz 200 --max-fr-mz 1800 --met-excision --min-pep-len 7 --max-pep-len 30 \
--min-pr-mz 300 --max-pr-mz 1800 --min-pr-charge 1 --max-pr-charge 4 --cut K*,R* --missed-cleavages 1 \
--unimod4 --no-prot-inf --reanalyse --rt-profiling原文的 Windows 命令沿用 \ 作为续行符,这是为了与 Linux 部分保持一致的排版。若在 Windows 的 cmd 中执行,续行符是 ^;在 PowerShell 中是反引号;也可以直接写成一行。这里按原文保留,未做改写。
The original Windows command uses \ for line continuation to match the Linux block. In Windows cmd the continuation character is ^, and in PowerShell it is a backtick; alternatively write the command on one line. It is reproduced verbatim here.
8. 参考文献 / References
- DIA-NN 官方仓库与发布页:https://github.com/vdemichev/DiaNN、https://github.com/vdemichev/DiaNN/releases
- Demichev, V., Messner, C. B., Vernardis, S. I., Lilley, K. S., & Ralser, M. (2020). DIA-NN: neural networks and interference correction enable deep proteome coverage in high throughput. Nature Methods 17, 41–44.(DOI 未在原文给出,引用前请自行核对)
- Docker Engine 安装文档(Ubuntu):https://docs.docker.com/engine/install/ubuntu/
- Microsoft 软件包仓库(.NET 8):https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb
